Figure 18.7.
Displaying the RDO Engine properties.
The rdoEnvironment Object
The rdoEnvironment object contains information about the current environment for data connections. The rdoEnvironment object is the RDO equivalent of the Microsoft Jet Workspaces object. rdoEnvironment objects can be used to group rdoConnection objects together for transaction-management purposes as well.
You can create multiple rdoEnvironment objects under the rdoEngine object. All rdoEnvironment objects are contained in the rdoEnvironments collection object.
Add a new button to the form. Set its Name property to cmdRDOEnvironment and its Caption to Environment. Now enter the code from Listing 18.8 to the cmdRDOEnvironment_Click event.
Listing 18.8. Coding the cmdRDOEnvironment_Click event.
Private Sub cmdRDOEnvironment_Click()
'
' show environment collection as properties
'
Dim strMsg As String
Dim rdoEnv As rdoEnvironment
Dim rdoNewEnv As rdoEnvironment
Dim aryCursorDriver As Variant
'
aryCursorDriver = Array("rdUseIfNeeded", "rdUseOdbc", "rdUseServer", "rdUseClientBatch", "rduseNone")
'
Set rdoNewEnv = rdoEngine.rdoCreateEnvironment("rdoTEMP", "admin", "")
'
For Each rdoEnv In rdoEngine.rdoEnvironments
strMsg = strMsg & "rdoCursorDriver=" & aryCursorDriver(rdoEnv.CursorDriver) & vbCrLf
strMsg = strMsg & "hEnv=" & CStr(rdoEnv.hEnv) & vbCrLf
strMsg = strMsg & "LoginTimeOut=" & CStr(rdoEnv.LoginTimeout) & vbCrLf
strMsg = strMsg & "Name=" & rdoEnv.Name & vbCrLf